//
//  HomeView.swift
//  WatchShouChong Watch App
//
//  Created by yw on 2024/8/19.
//

import SwiftUI
import HealthKit

struct HomeView: View {
//    let set: Set<HKSampleType> = Set([.heightType, .weightType, .stepType, .distanceType, .activeEnergyType, .workoutType])
    
    var body: some View {
        NavigationView(content: {
            ScrollView {
                
//                Button("123") {
//                    self.getUserHeartRate()
//                }
                NavigationLink(destination: ContentView()) {
                    Text("开始")
                }.padding(.top,30)
                Text("使用watch运动时，为了避免数据同步到iPhone失败，请保持应用在iPhone中保持开启哦")
                    .font(Font.system(size: 12, weight: .light, design: .rounded))
                    .foregroundColor(.gray)
            }
            .navigationTitle(
                Text("撸了么")
            )
        }).onAppear{
//            getHealthPremission()
        }
    }
    
   
}

